<template>
  <el-row style="margin-top: 60px">
    <el-col :span="3">
      <el-menu default-active="order" class="el-menu-vertical-demo" @select="handleSelect">
        <el-sub-menu index="orderManage">
          <template #title>
            <el-icon>
              <setting />
            </el-icon>
            <span>订单管理</span>
          </template>
          <el-menu-item index="order">
            <el-icon>
              <User />
            </el-icon>
            <span>我的订单</span>
          </el-menu-item>
        </el-sub-menu>
      </el-menu>
    </el-col>
    <el-col :span="21">
      <router-view></router-view>
    </el-col>
  </el-row>
</template>

<script setup>
import { Setting, User } from "@element-plus/icons-vue";
import { useRouter } from "vue-router";
const router = useRouter();
const handleSelect = (key) => {
  router.push({ name: key })
}
</script>
<style scoped lang="scss">
.el-row{
  height: calc(100vh - 62px);
  .el-col{
    height: 100%;
  }
  .el-menu{
    height: 100%;
  }
}
</style>